﻿using BCCommon;
using BCCommon.TMS.Order;
using BCDto.Sim.Admin.Admin;
using BCDto.TMS.Order.OrderCancelRecord;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCService.TMS.Order.OrderCancelRecord
{
    /// <summary>
    /// 订单取消记录
    /// </summary>
    public interface IOrderCancelRecordService
    {
        /// <summary>
        /// 添加订单取消记录
        /// </summary>
        /// <param name="orderId">订单Id</param>
        /// <param name="isDriverCancel">是否为司机取消</param>
        /// <param name="cancelOrderPromising">取消订单原因</param>
        /// <param name="driverName">司机姓名</param>
        /// <returns></returns>
        OrderCancelRecordDto Add(long orderId, bool isDriverCancel, string cancelOrderPromising, string driverName);
        /// <summary>
        /// 查询申请取消订单
        /// </summary>
        /// <param name="userId">用户Id</param>
        /// <param name="agentRecordId">代理商Id</param>
        /// <param name="driverId">司机Id</param>
        /// <param name="orderNo">订单编号</param>
        /// <param name="vehicleNo">车牌号</param>
        /// <param name="driverName">司机姓名</param>
        /// <param name="cancelStatus">取消状态</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="ascending">升序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        PageableList<OrderCancelRecordDto> Query(long? userId, long? agentRecordId, long? driverId, string orderNo, string vehicleNo, string driverName, OrderValidationStatus? cancelStatus, DateTime? start, DateTime? end, bool? ascending, int pageIndex, int pageSize);
        /// <summary>
        /// 获取订单取消记录
        /// </summary>
        /// <param name="orderCancelRecordId">订单取消记录Id</param>
        /// <returns></returns>
        OrderCancelRecordDto Get(long orderCancelRecordId);
        /// <summary>
        /// 审核取消订单成功
        /// </summary>
        /// <param name="adminDto">管理员信息</param>
        /// <param name="orderCancelRecordId">订单取消记录Id</param>
        /// <param name="putDto">取消订单记录审核</param>
        /// <returns></returns>
        OrderCancelRecordDto ValidationSuccess(AdminDto adminDto, long orderCancelRecordId, OrderCancelRecordPutDto putDto);
        /// <summary>
        /// 审核取消订单失败（拒绝）
        /// </summary>
        /// <param name="adminDto">管理员信息</param>
        /// <param name="orderCancelRecordId">订单取消记录Id</param>
        /// <param name="putDto">取消订单记录审核</param>
        /// <returns></returns>
        OrderCancelRecordDto ValidationFail(AdminDto adminDto, long orderCancelRecordId, OrderCancelRecordPutDto putDto);
    }
}
